<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>认购确认书签收</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select-big.css">
	<style>
		.content-btn {
		    margin: 0 16px;
		}
		.product-child-content{
			width: 750px;
			margin: 0 auto;
		}
		.product-child-content .content-btn {
		    margin: 0;
		}
		.content-table-two tbody tr td input{
			width: 80%;
			height: 30px;
			line-height: 30px;
			background: #F9FBFF;
			border: 1px solid #ecf2f7;
			border-radius: 15px;
			text-align: center;
		}
		.icon-delImg{
			display: inline-block;
		    background: url(images/close-1.png)no-repeat;
		    width: 25px;
		    height: 25px;
		    cursor: pointer;
		}
		.icon-delImg:hover{
			background: url(images/close-1.png)no-repeat 0 -27px;
		}
		.divLeft {
		    float: right;
		    width: auto;
		    display: inline-block;
		    margin-top: -35px;
		}
		.content-table-newservice {
		    width: 88%;
		    margin: 10px auto;
		}
		.content-table-newservice tbody tr td:nth-child(odd){
			width: 100px;
		}
		.content-table-newservice tbody tr td{
			border-bottom:1px solid #f5f5f5;
		}
		.content-table-newservice tbody tr:last-child td{
			border-bottom:0px solid #f5f5f5;
		}
		.content-table-newservice tbody tr td p{
			display: inline-block;
		    width: 640px;
		    min-height: 30px;
		    margin-top: 15px;
		    word-wrap: break-word;
		    line-height: 20px;
		}
	</style>
</head>
<body style="background:#fff;">
<div class="main-content-box">
	<div class="content-list">
		<table class="content-table-newservice" cellspacing="0" cellpadding="0">
			<tbody>
				<tr>
					<td><span>快递公司：</span></td>
					<td name="company"></td>
					<td><span>快递单号：</span></td>
					<td name ="tracknumber"></td>
				</tr>
				<tr>
					<td>描述：</td>
					<td colspan="3"><p name="reason"></p></td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="product-child-content">
		<div class="content-info">
			<div class="content-btn bot-line">
				<span class="title-info">纸质合同信息</span>
			</div>
			<form id="seachContractInboundForm" style="display: none">
			   <input name="confirtracknumber" type="hidden">
			   <button class="btn-style-two" style="display: none" type="button" id="seachContractInbound">搜索</button>
			</form>
			<div class="divLeft">发送数量：<span id="sendnum" name="sendnum"></span></div>
			<table id="table" datatable="true" pagenation="false" bindClick = "seachContractInbound" bindForm = "seachContractInboundForm"  dataAction="/contractDetail/findList" class="tableOrder content-table-two matop" cellspacing="0" cellpadding="0">			
			   <tbody style = "display:none;">
				            <th title = "id" style = "display:none;" name = "id" type = "string"></th>
							<th title = "项目编码" name = "projectcode" type = "string"></th>
							<th title = "项目名称" name = "projectname" type = "string"></th>
							<th title = "客户编号" name = "appoint.custcode" type = "string"></th>
							<th title = "客户名称" name = "appoint.custname" type = "string"></th>
							<th title = "到账金额" name = "transfercash" type = "Integer"></th>
							<th title = "合同编号" name = "contractcode" type = "string"></th>
							<th title = "理顾姓名" name = "isname" type = "string" ></th>
							<th title = "理顾编号" name = "iscode" type = "string"></th>						
				</tbody>					
				</table>
			<button class="save-btn matop" type="botton" id="save">确认签收</button>
		</div>
	</div>
</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
    <script type="text/javascript">
    $(document).ready(function (){
    	var data = parent.getData();
    	var val = {};
    	val.tracknumber = data.tracknumber;
    	$('input[name="confirtracknumber"]').val(data.tracknumber);	
    	$('td[name="company"]').text(data.company);
    	$('td[name="tracknumber"]').text(data.tracknumber);
    	$('p[name="reason"]').text(data.reason);
    	$('#sendnum').text(data.sends);
		$('#save').click(function(){   	
    	var val = {};
        	val.tracknumber = data.tracknumber
        	val.status ='1';   	
        	jQuery.ajax({
                url: baseUrl+'/expressInformation/confirmationSign',
                timeout: 60000,
                cache: false,
                data:val,
                success: function(datas) {
                	 if(datas>1){
                		parent.layer.closeAll();
                		parent.layer.msg("签收成功!");
                	 }
                	 else{
                		parent.layer.closeAll();
             			parent.layer.msg("签收失败!"); 
                	 }
                }
             })
    	
    	})
    })
    function tableCallBack(my){
    	
    }
	
	</script>
	<script type="text/javascript" src = "js/table.js"></script>
</body>
</html>